<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo CHtml::encode(Yii::app()->params["app"]["name"]); ?>&rsaquo; <?php echo CHtml::encode($this->pageTitle); ?></title>
<link rel="shortcut icon" href="<?php echo(Yii::app()->request->baseUrl.Yii::app()->params['app']['logoSmall']);?>" />
<link rel="shortcut icon" href="statics/images/miniyun-logo-small.png"/>
<link rel='stylesheet'
 href='<?php echo Yii::app()->request->baseUrl; ?>/statics/css/load-styles.css?v=<?php echo(Yii::app()->params['app']['version'])?>'
 type='text/css' media='all' />
<link rel='stylesheet' id='colors-css'
 href='<?php echo Yii::app()->request->baseUrl; ?>/statics/css/colors-fresh.css?v=<?php echo(Yii::app()->params['app']['version'])?>'
 type='text/css' media='all' />
 <style>
<!--
.bonus_entry_progress{
    border: solid 1px;
    width: 300px;
    height: 15px;
    margin-left: 5px;
}
 
.bonus_entry_bar{
    background-color: #0a0;
} 
 
.bonus_progress_text{
    position: relative;
    top:-14px; 
    margin-left:8px;
}
-->
</style>
</head>
<body>
<div id="dashboard_right_now" class="postbox ">
	<div class="handlediv" title="点击以切换">
	<br />
	</div>
	<h3 class='hndle'></h3>
	<div class="inside">

		<div class="table table_content">
			<p class="sub">文件基本信息</p>
			<table>
				<tr class="first">
					<td class="first b b-posts"><?php echo CHtml::link($fileModel->count(), "#", array('class'=>'total-count', 'onclick'=>"window.open('".Yii::app()->createUrl('adminUserPanel/index')."')")); ?></td>
					<td class="t posts"><?php echo CHtml::link('文件与目录', "#" ,array('class'=>'approved', 'onclick'=>"window.open('".Yii::app()->createUrl('adminUserPanel/index')."')")); ?></td>
				</tr>
				<tr>
					<td class="first b b_pages"><?php echo CHtml::link($fileModel->officeCount(),"#", array('onclick'=>"window.open('".Yii::app()->createUrl('adminFilePanel/office&office=1')."')")); ?></td>
					<td class="t pages"><?php echo CHtml::link('办公文档', "#", array('onclick'=>"window.open('".Yii::app()->createUrl('adminFilePanel/office&office=1')."')")); ?></td>
				</tr>
				<tr>
					<td class="first b b-cats"><?php echo CHtml::link($fileModel->imageCount(), "#", array('onclick'=>"window.open('".Yii::app()->createUrl('adminFilePanel/image&image=1')."')")); ?></td>
					<td class="t cats"><?php echo CHtml::link('图片', "#", array('class'=>'waiting', 'onclick'=>"window.open('".Yii::app()->createUrl('adminFilePanel/image&image=1')."')")); ?></td>
				</tr>
				<tr>
					<td class="first b b-tags"><?php echo CHtml::link($fileModel->deletedCount(), "#", array('onclick'=>"window.open('".Yii::app()->createUrl('adminFilePanel/trash&trash=1')."')")); ?></td>
					<td class="t tags"><?php echo CHtml::link('回收站', "#", array('class'=>'spam', 'onclick'=>"window.open('".Yii::app()->createUrl('adminFilePanel/trash&trash=1')."')")); ?></td>
				</tr>

			</table>
		</div>
		<div class="table table_discussion">
			<p class="sub">用户基本信息</p>
			<table>
			   <tr>
					<td class="b b-waiting"><?php echo CHtml::link($onlineDevice->getOnlineCount(), "#", array('onclick'=>"window.open('".Yii::app()->createUrl('adminControlPanel/online')."')")); ?></td>
					<td class="last t"><?php echo CHtml::link('在线用户', "#", array('class'=>'spam','onclick'=>"window.open('".Yii::app()->createUrl('adminControlPanel/online')."')")); ?></td>
				</tr>
				<tr class="first">
					<td class="b b-comments"><?php echo CHtml::link($userModel->count(), "#", array('onclick'=>"window.open('".Yii::app()->createUrl('adminUserPanel/index')."')")); ?></td>
					<td class="last t comments"><?php echo CHtml::link('用户', "#", array('class'=>'approved','onclick'=>"window.open('".Yii::app()->createUrl('adminUserPanel/index')."')")); ?></td>
				</tr>
				<tr>
					<td class="b b_approved"><?php echo CHtml::link($userModel->adminCount(), "#", array('onclick'=>"window.open('".Yii::app()->createUrl('adminUserPanel/index&isAdmin=1')."')")); ?></span></td>
					<td class="last t"><?php echo CHtml::link('管理员', "#", array('class'=>'waiting','onclick'=>"window.open('".Yii::app()->createUrl('adminUserPanel/index&isAdmin=1')."')")); ?></td>
				</tr>
				<tr>
					<td class="b b-waiting"><?php echo CHtml::link($userModel->disabledCount(), "#", array('onclick'=>"window.open('".Yii::app()->createUrl('adminUserPanel/index&disabled=1')."')")); ?></td>
					<td class="last t"><?php echo CHtml::link('冻结的用户', "#", array('class'=>'spam','onclick'=>"window.open('".Yii::app()->createUrl('adminUserPanel/index&disabled=1')."')")); ?></td>
				</tr>
			</table>
		</div>
		<div class="versions">
			<br class="clear" />
		</div>
	</div>
</div>
<!-- -->
<?php 
    $free = $model->getDiskFreeSpace();
    $used  = $model->getDiskUsedInMiniyun();
    $percent = round($used*100/$free,2);
?>
<div id="dashboard_right_now" class="postbox ">
 <h3 class='hndle'></h3>
 <div class="inside">
 <div class="table table_content">
   <p class="sub">空间使用情况</p>
   <div class="bonus_entry_progress">
    <div class="bonus_entry_bar"  style="height:15px; width:<?php echo $percent ?>%">&nbsp;</div>
    <div class="bonus_progress_text">
        <?php echo "已用 ：" . CUtils::getFormatSize($used) . "， 剩余空间：" . CUtils::getFormatSize($free);?>&nbsp;&nbsp;&nbsp;&nbsp;
<!--        <?php ?>: <?php ?>%-->
    </div>
 </div>
 </div>
</div>

 <br />
<!-- -->
<div id="dashboard_right_now" class="postbox ">
 <h3 class='hndle'></h3>
 <div class="inside">
 <div class="table table_content">
   <p class="sub">存储路径 </p>
   <div style="margin-left: 8px; margin-top: 10px; WIDTH: 350px; WORD-WRAP: break-word">
     <strong><?php echo BASE;?></strong>
   </div>
 </div>
 </div>
<!-- -->

</body>
</html>